/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package net.etfbl.healt;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Zoran
 */
@Entity
@Table(name = "latest_state")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "LatestState.findAll", query = "SELECT l FROM LatestState l"),
    @NamedQuery(name = "LatestState.findByFirstName", query = "SELECT l FROM LatestState l WHERE l.firstName = :firstName"),
    @NamedQuery(name = "LatestState.findByLastName", query = "SELECT l FROM LatestState l WHERE l.lastName = :lastName"),
    @NamedQuery(name = "LatestState.findByRoom", query = "SELECT l FROM LatestState l WHERE l.room = :room"),
    @NamedQuery(name = "LatestState.findByUpdateDate", query = "SELECT l FROM LatestState l WHERE l.updateDate = :updateDate"),
    @NamedQuery(name = "LatestState.findByOxigenLevel", query = "SELECT l FROM LatestState l WHERE l.oxigenLevel = :oxigenLevel"),
    @NamedQuery(name = "LatestState.findByHeartRate", query = "SELECT l FROM LatestState l WHERE l.heartRate = :heartRate"),
    @NamedQuery(name = "LatestState.findByBloodPresure", query = "SELECT l FROM LatestState l WHERE l.bloodPresure = :bloodPresure"),
    @NamedQuery(name = "LatestState.findById", query = "SELECT l FROM LatestState l WHERE l.id = :id")})
public class LatestState implements Serializable {
    private static final long serialVersionUID = 1L;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 45)
    @Column(name = "first_name")
    private String firstName;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 45)
    @Column(name = "last_name")
    private String lastName;
    @Size(max = 45)
    @Column(name = "room")
    private String room;
    @Column(name = "update_date")
    @Temporal(TemporalType.TIMESTAMP)
    private Date updateDate;
    @Column(name = "oxigen_level")
    private Long oxigenLevel;
    @Column(name = "heart_rate")
    private Long heartRate;
    @Column(name = "blood_presure")
    private Long bloodPresure;
    @Basic(optional = false)
    @NotNull
    @Id
    @Column(name = "id")
    private int id;

    public LatestState() {
    }

    public String getFirstName() {
        return firstName;
    }

    public void setFirstName(String firstName) {
        this.firstName = firstName;
    }

    public String getLastName() {
        return lastName;
    }

    public void setLastName(String lastName) {
        this.lastName = lastName;
    }

    public String getRoom() {
        return room;
    }

    public void setRoom(String room) {
        this.room = room;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    public Long getOxigenLevel() {
        return oxigenLevel;
    }

    public void setOxigenLevel(Long oxigenLevel) {
        this.oxigenLevel = oxigenLevel;
    }

    public Long getHeartRate() {
        return heartRate;
    }

    public void setHeartRate(Long heartRate) {
        this.heartRate = heartRate;
    }

    public Long getBloodPresure() {
        return bloodPresure;
    }

    public void setBloodPresure(Long bloodPresure) {
        this.bloodPresure = bloodPresure;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }
    
}
